package com.sh.data.engine.domain.datadev.flink.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sh.data.engine.domain.datadev.flink.model.domain.FlinkResourceDomain;
import com.sh.data.engine.domain.datadev.flink.model.param.SaveResourceParam;

import java.util.List;

/**
 * @author: zigui.zdf
 * @description:
 * @date: 2021/6/3 14:30
 */
public interface FlinkResourceService {

    void delete(Long nodeId);

    void deleteById(Long id);

    FlinkResourceDomain getActiveByNodeId(Long nodeId);

    List<FlinkResourceDomain> getActiveListByNodeIds(List<Long> nodeIds);

    FlinkResourceDomain getById(Long id);

    void publish(Long nodeId, Integer status, String userId);

    void rollbackVersion(Long nodeId, Long versionId);

    Long uploadFlinkResource(Long projectId, String fileName, byte[] data);

    boolean saveFlinkResource(SaveResourceParam saveResourceParam);

    FlinkResourceDomain getFlinkResourceByNodeId(Long id);

    IPage<FlinkResourceDomain> getFlinkResourceList(
        Long nodeId, Integer pageNum, Integer pageSize);

    Boolean editFlinkResourceByNodeId(Long id, String resourceName);

    List<FlinkResourceDomain> getFlinkResourceList(Long projectId);

    FlinkResourceDomain getFlinkResourceById(Long id);
}
